explicitly set colours for header items
authorJyrki Gadinger <nilsding@nilsding.org>
Wed, 19 Mar 2025 09:31:47 +0000 (10:31 +0100)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Wed, 19 Mar 2025 12:10:47 +0000 (12:10 +0000)
the _Universal_ theme notably sets [`icon.color` on `Button`s][0] and
also the [`color` on `Label`s][1], ignoring what's set through the
`palette` property ...

[0]: https://github.com/qt/qtdeclarative/blob/215619d71b69be02348e12dc2dfea087c3ec2abb/src/quickcontrols/universal/Button.qml#L23
[1]: https://github.com/qt/qtdeclarative/blob/215619d71b69be02348e12dc2dfea087c3ec2abb/src/quickcontrols/universal/Label.qml#L12

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
src/gui/tray/CurrentAccountHeaderButton.qml
src/gui/tray/HeaderButton.qml

index 787470f9aa8dc92c8277ca6b1bedebe8bd9508d0..ca3a3a5ecd6d8dcf3d8fdfde207e5855c31cfe93 100644 (file)
@@ -198,6 +198,7 @@ Button {
                 id: currentAccountUser
                 Layout.alignment: Qt.AlignLeft | Qt.AlignBottom
                 width: Style.currentAccountLabelWidth
+                color: palette.windowText
                 text: UserModel.currentUser ? UserModel.currentUser.name : ""
                 elide: Text.ElideRight
 
@@ -209,6 +210,7 @@ Button {
                 id: currentAccountServer
                 Layout.alignment: Qt.AlignLeft | Qt.AlignBottom
                 width: Style.currentAccountLabelWidth
+                color: palette.windowText
                 text: UserModel.currentUser ? UserModel.currentUser.server : ""
                 elide: Text.ElideRight
                 visible: UserModel.numUsers() > 1
@@ -225,6 +227,7 @@ Button {
                     id: emoji
                     visible: UserModel.currentUser && UserModel.currentUser.statusEmoji !== ""
                     width: Style.userStatusEmojiSize
+                    color: palette.windowText
                     text: UserModel.currentUser ? UserModel.currentUser.statusEmoji : ""
                 }
                 EnforcedPlainTextLabel {
@@ -233,6 +236,7 @@ Button {
                     Layout.fillWidth: true
                     visible: UserModel.currentUser && UserModel.currentUser.statusMessage !== ""
                     width: Style.currentAccountLabelWidth
+                    color: palette.windowText
                     text: UserModel.currentUser && UserModel.currentUser.statusMessage !== ""
                           ? UserModel.currentUser.statusMessage
                           : UserModel.currentUser ? UserModel.currentUser.server : ""
index 6bdcb28768efa674ff6683b9371f1d71f55e6659..b133a75329436b22803adb266d708e434f27b1f6 100644 (file)
@@ -32,6 +32,7 @@ Button {
 
     icon.width: Style.headerButtonIconSize
     icon.height: Style.headerButtonIconSize
+    icon.color: "transparent"
 
     Layout.alignment: Qt.AlignRight
     Layout.preferredWidth:  Style.trayWindowHeaderHeight